#pragma once
#include <map>
#include "field_define.h"
struct FieldValue {
    SOUI::SStringW      text;
    SOUI::SStringW      color;
};

class CGoods {
    friend class GoodsManager;
  public:
    CGoods();
    ~CGoods();
    
  public:
    FieldValue getStrValue(int filed);
    SOUI::SStringW  getName();
    SOUI::SStringW  getStrCode();
    int32_t code();
    
  public:
    void setValue(int field, const std::string &v);
    
  private:
    SOUI::SStringW m_codeText;
    SOUI::SStringW m_name;
    uint32_t        m_code = 0;
    
    std::map<int, SOUI::SStringW> m_values;
};
typedef std::shared_ptr<CGoods> GoodsPtr;